﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI; 
using System.Web.UI.WebControls;

namespace SaleOnlineSystem.Admin.Controls
{
    public partial class FieldProduct : System.Web.UI.UserControl
    {
        protected void Page_Load(object sender, EventArgs e)
        {

        }

        protected void Cate1_SelectedIndexChanged(object sender, EventArgs e)
        {
            try
            {
                string table = ddlfield.SelectedValue;
                dg_field.DataSource = DAL.DCollector.DBCollector.Instance.StoredProcedureSelectByColumns(table, " * ", "selectbycolumns");
                dg_field.DataBind();
            }
            catch (Exception)
            {
                Response.Redirect("/error.htm");
            }           
        }
    }
}